import React, {Component, PropTypes} from 'react'
import { connect } from 'react-redux'
import { Router, Route, Redirect, IndexRoute, hashHistory } from 'react-router'

import wrapper from '../../wrapper'
import crmReport from '../component/crmReport'
import userDetail from '../component/userDetail'



//使用React-Router将组件更好地结合在一起
const RouteConfig = (
    <Router history={hashHistory}>
        <Route component={wrapper}>
            <IndexRoute component={crmReport} />
            <Route  path="/crmReport" component={crmReport} />
            <Route  path="/detail" component={userDetail} />
        </Route>
        <Redirect from='*' to='/crmReport'  />
    </Router>
);

export default RouteConfig;